function http({
    url,
    success
}){
    wx.request({
        url,
        header: {'content-type':'application/json'},
        method: 'GET',
        dataType: 'json',
        responseType: 'text',
        success:(result)=>{
            success(result)
        },
        
    });
}
function handleStr(str){
    if(str.length>6){
        str = str.slice(0,6)+"..."
    }
    return str;
}
module.exports = {
    http,
    handleStr
}